import request from '@/utils/request'

// 测试管理列表
export function evaluation(query){
  return request({
    url: '/evaluation/management/list',
    method: 'get',
    params:query
  })
}

// 添加测评
export function managementAdd(data){
  return request({
    url: '/evaluation/management/add',
    method: 'post',
    data,
  })
}

// 心理测评详情
export function titleDetails(id){
  return request({
    url: '/evaluation/management/title/details',
    method: 'get',
    params:id,
  })
}

// 心理测评编辑
export function managementTitleDetails(id){
  return request({
    url: `/evaluation/management/editreturn/${id}`,
    method: 'get',
  })
}

// 编辑提交
export function evaluationManagementEdit(data){
  return request({
    url: '/evaluation/management/edit',
    method: 'put',
    data
  })
}

// 心理测评设置
export function setList(id){
  return request({
    url: `/evaluation/management/set/list?pageSize=10&pageNum=1&assessmentId=${id}`,
    method: 'get',
  })
}
//点击题目编辑
export function editreturn(id){
  return request({
    url: `/evaluation/management/title/editreturn/${id}`,
    method: 'get',
  })
}
// 题目编辑
export function titleEdit(data){
  return request({
    url: '/evaluation/management/title/edit',
    method: 'put',
    data
  })
}

// 心理测评设置（添加提示内容）
export function setAdd(data){
  return request({
    url: '/evaluation/management/set/add',
    method: 'POST',
    data
  })
}

// 心理测评编辑
export function titleAdd(data) {
  return request({
    url: '/evaluation/management/title/add',
    method: 'POST',
    data
  })
}

// 删除题目
export function managementTitleDel(ids) {
  return request({
    url: '/evaluation/management/title/del/'+ids,
    method: 'DELETE',
  })
}

// 心理测评设置编辑
export function managementSetEdit(data) {
  return request({
    url: '/evaluation/management/set/edit',
    method: 'PUT',
    data
  })
}

// 点击提示内容的编辑

export function managementSetEditreturn(id) {
  return request({
    url: '/evaluation//evaluation/management/set/editreturn'+id,
    method: 'GET',
  })
}

//删除提示信息
export function managementSetDel(ids) {
  return request({
    url: '/evaluation/management/set/del/'+ids,
    method: 'DELETE',
  })
}

// 导入
export function managementTitleImport() {
  return request({
    url: '/evaluation/management/title/import',
    method: 'POST',
  })
}
